﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using BoostSite.Demo.Definitions.Base.PageTypes;
using BoostSite.Demo.Definitions.Templates.SharedBlockTypes.General;
using EPiBoost.Core.DataAnnotations;
using EPiBoost.Core.DataAnnotations.Validators;
using EPiServer.Core;
using EPiServer.DataAbstraction;
using EPiServer.DataAnnotations;
using EPiServer.SpecializedProperties;

namespace BoostSite.Demo.Definitions.Templates.PageTypes.General
{
	[ContentType(GroupName = PageGroupNames.General,
		DisplayName = "Start Page",
		Description = "Root page",
		AvailableInEditMode = true,
		Order = 1,
		GUID = "{46950C19-7F47-4C3F-A9D8-AC1A38BE22EC}")]
	[AutoImageThumbnail(typeof(StartPage))]
	public class StartPage : BasePageType
	{
		#region Content 

		[Display(Name = "Intro",
			Description = "",
			GroupName = TabNames.Content,
			Order = 2)]  
		public virtual XhtmlString MainIntro { get; set; }
		 
		
		[Display(
			Name = "Main Blocks",
			Description = "",
			GroupName = TabNames.Content,
			Order = 3)]
		public virtual ContentArea MainBlocks { get; set; }

		#endregion

		#region Configuration

		[Display(
			Name = "Site configuration blocks",
			Description = "",
			GroupName = TabNames.Configuration,
			Order = 99)]
		[AvailableContentTypes(Include = new []{typeof(SiteConfigurationBlock)})]
		public virtual ContentArea ConfigurationBlocks { get; set; }

		#endregion
	}
}
